'''
Created on Mar 23, 2011
@author: Eric
'''
import subprocess

class SelectInterface(object):
    '''
    Allows user to select their wireless interface from list of avaiable wireless interfaces.
    '''

    def __init__(self,interface=''):
        '''
        Constructor
        '''
        self._interface = interface
        self._interfaceList = []

    def getInterfaces(self):
        '''
        Scans wifi using the interface that was provided and splits the results into instance lists.
        '''
        interfaces = subprocess.Popen(['/sbin/iwconfig'],stdout=subprocess.PIPE)
        stdout, stderr =  interfaces.communicate()
        lines = stdout.split('\n')
        lines = lines[1:]
        data = []
        # To be continued..

